﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Windows.Forms;

namespace SPMigrationOracleUtility
{
    class FileHelper
    {
        public bool isValidFile{  get; set;}
        public string FileName { get; set; }
        public string DirectoryName { get; set; }
        public string Extension { get; set; }

        public FileHelper()
        {
        }
        public FileHelper(string Filepath)
        {
            try
            {
                //DirectoryInfo dir = new DirectoryInfo(Filepath);
                //string str = dir.Parent.Name ;
                FileInfo objfile = new FileInfo(Filepath);
                string[] arr = objfile.Name.Split('.');
                FileName = arr[0];
                //FileName = objfile.Name;
                DirectoryName = objfile.DirectoryName;
                Extension = objfile.Extension;

            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);          
            }
        }
    }
}
